#pragma once

#include "IComponent.h"
#include "Vector3D.h"
#include "Quaternion.h"
#include "Subject.h"
#include "INode.h"

class OrientationComponent : public IComponent
{
public:
	static const HashedString type;
	
	OrientationComponent( Entity* parent );
	OrientationComponent( OrientationComponent& o );
	virtual ~OrientationComponent();
	
	const HashedString& Type();
	std::string ToString() const;
	bool ToXML( tinyxml2::XMLPrinter& printer );

	void Move( Maths::Vector3D& movement );
	void Rotate( Maths::Quaternion& rotation );
	Subject<Maths::Vector3D>& getPosition();
	Subject<Maths::Quaternion>& getRotation();
	Pointer<INode>& getTransformNode();
protected:
	Subject<Maths::Vector3D> m_position;
	Subject<Maths::Quaternion> m_rotation;
	Pointer<INode> m_transformNode;
};